#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <ctype.h>

#define MAX_BUF 201

#define NUM_STATUS 0
#define CHAR_STATUS 1

typedef struct {
    char c;
    char* str;
} KeyBoard;

KeyBoard key[] = {
    {'0', " "},
    {'1', ",."},
    {'2', "abc"},
    {'3', "def"},
    {'4', "ghi"},
    {'5', "jkl"},
    {'6', "mno"},
    {'7', "pqrs"},
    {'8', "tuv"},
    {'9', "xyz"},
};

char loop(char old, char in)
{
    int i = in - '0';
    char* str = key[i].str;
    if (old == '\0') {
        return str[0];
    }

    int pos;
    int len = strlen(str);
    for (pos = 0; pos < len; pos++) {
        if (old == str[pos]) {
            break;
        }
    }

    pos++;
    if (pos >= len) {
        pos = 0;
    }
    return str[pos];
}

int main(int argc, char const* argv[])
{
    freopen("./in.txt", "r", stdin);

    char input[MAX_BUF] = { 0 };
    char output[MAX_BUF] = { 0 };
    int pos = 0;
    int status = NUM_STATUS;
    gets(input);

    for (int i = 0; i < strlen(input); i++) {
        char curchar = input[i];
        if (curchar == '#') {
            if (output[pos] != '\0') {
                pos++;
            }
            status = !status;
            continue;
        }

        if (status == NUM_STATUS) {
            output[pos] = curchar;
            pos++;
            continue;
        }

        char lastchar = (i == 0) ? '*' : input[i - 1];
        if (curchar == '/') {
            if (output[pos] != '\0') {
                pos++;
            }
            continue;
        }

        if (curchar != lastchar) {
            if (output[pos] != '\0') {
                pos++;
            }
        }
        output[pos] = loop(output[pos], curchar);
    }

    printf("%s\n", output);

    return 0;
}